<div class="rightDiv">
  <div class="exciseTableDiv">
    <div class="searchDiv fl-r" style="margin-bottom: 15px">
      <label>
        <span>类型：</span>
        <input nz-input placeholder="请输入类型" [(ngModel)]="moduleName"/>
      </label>
      <label>
        <span>操作：</span>
        <nz-select [(ngModel)]="operationType" style="width:100px;">
          <nz-option *ngFor="let type of operateList" [nzLabel]="type.value" [nzValue]="type.text" nzLabel="Jack"></nz-option>
        </nz-select>
      </label>
      <label>
        <span>日期：</span>
        <nz-date-picker [(ngModel)]="date" (ngModelChange)="onChange($event)"></nz-date-picker>
      </label>
      <label>
        <span>姓名：</span>
        <input nz-input placeholder="请输入姓名" [(ngModel)]="operator"/>
      </label>
      <label style="margin-right: 0">
        <button nz-button style="margin-right:10px" nzType="primary" (click)="clickSearch()">查询</button>
        <button nz-button nzType="default" (click)="resetSearch()">重置</button>
      </label>
    </div>
    <div class="tableTop fl-l" style="margin-bottom: 15px">
      <button nz-button nzType="default" (click)="downloadTable()"><i nz-icon nzType="download" nzTheme="outline"></i>导出
      </button>
    </div>
    <div style="margin-top: 35px">
      <ng-template #totalTemplate let-total>总共 {{ pageInfo.totalRecords? pageInfo.totalRecords:0 }} 条</ng-template>
      <nz-table
        #exciseBankTable
        nzBordered
        [nzData]="allList"
        [nzFrontPagination]="false"
        [nzShowPagination]="true"
        [nzPageIndex]="pageInfo.first"
        [nzTotal]="pageInfo.totalRecords"
        [nzShowTotal]="totalTemplate"
        [nzPageSize]="pageInfo.rows"
        [nzLoadingDelay]="1"
        [nzPageSizeOptions]="[10,20,30,50,100]"
        [nzShowQuickJumper]="true"
        [nzShowSizeChanger]="true"
        (nzPageIndexChange)="searchPageIndex($event)"
        (nzPageSizeChange)="searchPageSize($event)"
        (nzCurrentPageDataChange)="currentPageDataChange($event)"
      >
        <thead>
        <tr>
          <th>序号</th>
          <th>日期</th>
          <th>姓名</th>
          <th>类型</th>
          <th>操作</th>
          <th width="400px">日志</th>
          <th>IP</th>
        </tr>
        </thead>
        <tbody>
        <tr *ngFor="let data of exciseBankTable.data;let num = index">
          <td>{{num + 1}}</td>
          <td>{{ data.gmtCreate | date:'yyyy-MM-dd HH:mm:ss' }}</td>
          <td>{{ data.operator ? data.operator : '-'}}</td>
          <td>{{ data.moduleName}}</td>
          <td *ngIf="data.operationType == 'create'">新增</td>
          <td *ngIf="data.operationType == 'update'">编辑</td>
          <td *ngIf="data.operationType == 'delete'">删除</td>
          <td *ngIf="data.operationType == 'query'">查询</td>
          <td *ngIf="data.operationType == 'check'">审批</td>
          <td *ngIf="data.operationType == 'upload'">导入</td>
          <td *ngIf="data.operationType == 'download'">导出</td>
          <td *ngIf="!data.operationType">-</td>
          <td>
            <div style="width: 400px" class="spance" title="{{data.operValue}}">
              {{ data.operValue ? data.operValue : '-'}}
            </div>
          </td>
          <td>{{ data.operatorIp ? data.operatorIp : '-'}}</td>
        </tr>
        </tbody>
      </nz-table>
    </div>
  </div>
</div>
